module.exports = {
  devServer: {
    proxy: {
      '/api': { //匹配一api开头的请求
        target: 'http://localhost:8081', //请求路径
        changOrigin: true,
        pathRewrite: {
          '^/api': ''
        }, //将请求api替换为空
        ws: true,
        changeOrigin: true
      },
      '/foo': {
        target: '<other_url>'
      }
    }
  }
}
